package com.tuliyou.common.constant;

/**
 * 响应码定义类
 */
public class ResponseStatusCodeConstant {
    // 成功
    public static final int SUCCESS = 0;

    // 通用错误码
    public static final int ERROR = -1;
    public static final int PARAM_ERROR = 1001;
    public static final int DATA_NOT_FOUND = 1002;
    public static final int DATA_ALREADY_EXISTS = 1003;

    // 用户相关错误码
    public static final int USER_NOT_LOGIN = 2001;
    public static final int USER_NOT_EXIST = 2002;
    public static final int USER_ALREADY_EXISTS = 2003;
    public static final int PASSWORD_ERROR = 2004;
    public static final int TOKEN_EXPIRED = 2005;
    public static final int TOKEN_INVALID = 2006;
    public static final int PERMISSION_DENIED = 2007;

    // 业务相关错误码
    public static final int RECOMMENDATION_FAILED = 3001;
    public static final int FAVORITE_ALREADY_EXISTS = 3002;

    // 系统错误码
    public static final int SYSTEM_ERROR = 5001;
    public static final int DATABASE_ERROR = 5002;
    public static final int NETWORK_ERROR = 5003;

    // 私有构造函数，防止实例化
    private ResponseStatusCodeConstant() {
        throw new AssertionError("Cannot instantiate ResponseCode class");
    }
}